fh1 = fopen( 'testwrite_data.dat', 'r' );
fh2 = fopen( 'testwrite_num.dat', 'r' );
num = fread( fh2, 1, 'int' );
data = fread( fh1, num, 'double' );
fclose(fh1);
fclose(fh2);
